using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Indexes
{
    /// <summary>
    /// <para>Remove Attribute Index</para>
    /// <para>This tool deletes an attribute index from an existing table, feature class, shapefile, or attributed relationship class.</para>
    /// <para>此工具可从现有表、要素类、shapefile 或属性关系类中删除属性索引。</para>
    /// </summary>    
    [DisplayName("Remove Attribute Index")]
    public class RemoveIndex : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RemoveIndex()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The table containing the index or indexes to be deleted. Table can refer to an actual table, a feature class attribute table, or an attributed relationship class.</para>
        /// <para>包含要删除的一个或多个索引的表。表可以指实际表、要素类属性表或属性关系类。</para>
        /// </param>
        /// <param name="_index_name">
        /// <para>Index Name or Indexed Item</para>
        /// <para>The name of the index or indexes to be deleted.</para>
        /// <para>要删除的一个或多个索引的名称。</para>
        /// </param>
        public RemoveIndex(object _in_table, List<object> _index_name)
        {
            this._in_table = _in_table;
            this._index_name = _index_name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Remove Attribute Index";

        public override string CallName => "management.RemoveIndex";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_table, _index_name, _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The table containing the index or indexes to be deleted. Table can refer to an actual table, a feature class attribute table, or an attributed relationship class.</para>
        /// <para>包含要删除的一个或多个索引的表。表可以指实际表、要素类属性表或属性关系类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Index Name or Indexed Item</para>
        /// <para>The name of the index or indexes to be deleted.</para>
        /// <para>要删除的一个或多个索引的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Index Name or Indexed Item")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _index_name { get; set; }


        /// <summary>
        /// <para>Updated Input Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public RemoveIndex SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}